'''
Created on May 24, 2011

@author: anupams
'''

from com.anupam.trees.TreesAnupam import TreeOperations, TreeNode, Utils

class TreesAnupamTest(object):


  def  __init__(self, rootNodePointer):
    self.rootNode = rootNodePointer
    self.treeOper = TreeOperations()


  def testForInsertion(self,value):
    self.treeOper.insertNode(self.rootNode,value)


  def testForInOrderTraversal(self,container):
    self.treeOper.inorderTraversal(self.rootNode,container)


if __name__ == '__main__':
  testObj = TreesAnupamTest(TreeNode(3000))
  inOrderTraversed = []
  nums = Utils().generateNumbers(10)
  print nums
  for i in range(0,len(nums)):
    testObj.testForInsertion(nums[i])
  testObj.testForInOrderTraversal(inOrderTraversed)
  print ''.join(inOrderTraversed)